package com.xhh.learning.record.jvm;

/**
 * @author: Administrator
 * @date: 2018/7/26 11:27
 * 栈上分配：-XX:-UseTLAB，再利用HSDB查看对象
 */
public class StackAllcation {

    public static void main(String[] args) {
        for (int i = 0; i < 1500; i++) {
            StackObject stackObject = new StackObject();
            stackObject.a = i;
        }
        for (int i = 1500; i < 1590; i++) {
            StackObject stackObject = new StackObject();
            stackObject.a = i;
        }

        System.out.println("方便断点查看对象分配");
    }

}

class StackObject{
   public int a;
}
